package iterator;

import java.util.Iterator;

/**
 * @ClassName test
 * @Description TODO
 * @Author leejiliang
 * @DateTime 2021/2/22 15:02
 * @Version 1.0
 */
public class test {
	public static void main(String[] args) {
		Floor floor = new Floor(10);
		floor.AddRoom(new Room("1"));
		floor.AddRoom(new Room("2"));
		floor.AddRoom(new Room("3"));
		floor.AddRoom(new Room("4"));
		floor.AddRoom(new Room("5"));

		System.out.println(floor.getRoom(4));
		System.out.println(floor.getLength());
		final Iterator iterator = floor.iterator();
		while (iterator.hasNext()) {
			System.out.println(iterator.next());
		}
	}
}
